<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<title>Group Management</title>
</head>
<link rel="stylesheet" href="../../../resources/css/fw-edit.css"
	type="text/css">
<script src="../../../script/base.js"></script>
<body>
<f:view>
	<f:loadBundle basename="net.orange.conf.lang.fw" var="msg" />
	<h:form id="myForm">
		<h:inputHidden value="#{group.content.pk}" id="pk" />
		<h:inputHidden value="#{group.editMode}" id="editMode" />

		<h:panelGrid columns="2" rowClasses="content-title"
			style="width:100%;">
			<h:outputText value="#{msg.group_title}." />

			<h:panelGroup style="text-align:right">
				<h:commandButton value="#{msg.common_edit}" type="submit"
					id="cmdEdit" action="#{group.edit}" styleClass="button-normal"
					rendered="#{not group.editMode}" />

				<h:commandButton value="#{msg.common_save}" type="submit"
					id="cmdSave" action="#{group.save}" styleClass="button-normal"
					rendered="#{group.editMode}" />

				<h:outputText value="    " />

				<h:commandButton value="#{msg.common_cancel}" type="submit"
					id="cmdCancel" action="#{group.back}" styleClass="button-normal" />
			</h:panelGroup>
		</h:panelGrid>

		<hr>

		<h:messages styleClass="content-message" />

		<h:panelGrid columns="2" styleClass="content-table"
			columnClasses="content-detail-title,content-detail">
			<h:outputLabel value="#{msg.common_pk}:" />
			<h:outputText value="#{group.content.pk}" />

			<h:outputLabel value="#{msg.group_code}:" />
			<h:inputText value="#{group.content.group_code}" id="group_code"
				disabled="#{not group.editMode}" />


			<h:outputLabel value="#{msg.group_name}:" />
			<h:inputText value="#{group.content.group_name}" id="group_name"
				disabled="#{not group.editMode}" />

			<h:outputLabel value="#{msg.group_dept}:" />
			<h:selectOneMenu value="#{group.deparment_code}"
				id="parent_dept_code" disabled="#{not group.editMode}">
				<f:selectItems value="#{department.departments}" />
			</h:selectOneMenu>

			<h:outputLabel value="#{msg.common_description}:" />
			<h:inputTextarea value="#{group.content.description}"
				id="description" style="width:360px" rows="8"
				disabled="#{not group.editMode}" />
		</h:panelGrid>

	</h:form>
</f:view>
</body>
</html>
